/**
 * 
 */
package com.munoor.dalai.server.model.wrappers;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author Osho Ilamah
 * @since version 1.0 (07 April 2011)
 */
@XmlRootElement(name = "listings")
public class WrappedListingList extends WrappedEntityList {
	private List<WrappedListing> wrappedListings = null;
	private String queryNext;
	private String queryPrevious;
	private int start;
	private int items;
	private int count;
	
	public WrappedListingList() {
	}

	public WrappedListingList(List<WrappedListing> wrappedListings, String queryNext, String queryPrevious, int start, int items, int count) {
		this.wrappedListings = wrappedListings;
		this.queryNext = queryNext;
		this.queryPrevious = queryPrevious;
		this.start = start;
		this.items = items;
		this.count = count;
	}
	

	@XmlElement
	public List<WrappedListing> getListings() {
		if (wrappedListings != null) {
			return wrappedListings;
		} else {
			return new ArrayList<WrappedListing>();
		}
	}

	public void setListings(List<WrappedListing> wrappedListings) {
		this.wrappedListings = wrappedListings;
	}

	@XmlAttribute
	public String getQueryPrevious() {
		return queryPrevious;
	}

	@XmlAttribute
	public String getQueryNext() {
		return queryNext;
	}
	
	@XmlAttribute
	public int getStart() {
		return start;
	}

	@XmlAttribute
	public int getItems() {
		return items;
	}

	@XmlAttribute
	public int getCount() {
		return count;
	}
}
